/********************************************************************



Write Date: 2011/03/28
Author: Deng Nianchen
>>>> 
	
*********************************************************************/
#ifndef SOCKET_SERVER_MANAGER_H
#define SOCKET_SERVER_MANAGER_H
#include "Global.hpp"
#include <string>
#include <ooputils/Singleton.hpp>
#include <ooputils/Ptr.hpp>
#include "SocketListener.h"
#include "SocketClient.h"


_OOPNETWORK_BEGIN

class _EXPORT_NETWORK_CLASS SocketManager
  : public OOPUtils::Singleton< SocketManager >
{

  friend class OOPUtils::Singleton< SocketManager >;

private:

  SocketManager ();

  ~SocketManager ();

public:

  OOPUtils::OOPPtr< SocketListener > getSocketListener (
      unsigned short port, const std::string & ip) const;

  OOPUtils::OOPPtr< SocketClient > getSocketClient () const;

};

_OOPNETWORK_END

#endif